'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
	//event为客户端上传的参数
	const type = event.type
	if (type == "comment") {
		const t_id = event.id
		return await db.collection('comment').where({
			t_id,
		}).orderBy("time","desc").get()
	}else{
		const id = event.re_id
		return await db.collection('re_comment').where({
			id,
		}).get()
	}


};
